package org.accp.baodan.web;

import entity.warranty_info;
import entity.warranty_info_Date;
import org.accp.baodan.dto.PageBean;
import org.accp.baodan.dto.warrantydto;
import org.accp.baodan.service.Baodanservice;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@CrossOrigin(methods= {RequestMethod.POST,RequestMethod.GET})
@RestController
public class Baodanweb {
    @Resource
    private Baodanservice baodanservice;
    @RequestMapping("/baodanselect")
    public PageBean baodanselect(PageBean pb){
        return baodanservice.baodanselect(pb);
    }
    @RequestMapping("/baodaninsert")
    public void baodaninsert(warrantydto  warrantydto1){
        baodanservice.baodaninsert(warrantydto1);
    }
    @RequestMapping("/chepaiselect")
    public warranty_info chepaiselect(String shen){//根据车牌号查询
        return  baodanservice.chepaiselect(shen);
    }
    @RequestMapping("/shenheupdate")//修改审核状态
    public void updatashenhe(warranty_info warranty_info){
        baodanservice.updatashenhe(warranty_info);
    }
}
